package com.shwread.android.newui.page;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.shwread.android.qysw.activity.MainActivity;
import com.shwread.android.qysw10000229.R;
import com.shwread.android.ui.page.AbstractUIPage;
import com.tgx.tina.android.ipc.framework.IUIPage;

import base.tina.core.task.infc.ITaskResult;

public class LoginViewPage extends AbstractUIPage<MainActivity> {

    private static LoginViewPage instance;
    public static LoginViewPage getInstance(MainActivity t) {
        if (null == instance) {
            instance = new LoginViewPage(t);
        } else {
            instance.setActivity(t);
        }
        return instance;
    }

    public LoginViewPage(MainActivity t) {
        super(t);
    }

    @Override
    public <E extends Activity> View createView(E arg0, int arg1) {
        curMyView = bActivity.getLayoutInflater().inflate(R.layout.login_view_exhibition, null);
        Button btn = (Button) curMyView.findViewById(R.id.common_header_back);
        btn.setVisibility(View.VISIBLE);
        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                bActivity.onBackPressed();
            }
        });
        return curMyView;
    }

    @Override
    public int enter(IUIPage<?> arg0) {
        return 0;
    }

    @Override
    public int leave(IUIPage<?> arg0) {
        return 0;
    }

    @Override
    public void notifyView(int arg0, Bundle arg1) {
    }

    @Override
    public void setStatus(int arg0) {
    }

    @Override
    public View updateView(int arg0, ITaskResult arg1) {
        return null;
    }
}
